# coding=utf-8
a = int(input())
b = str(bin(a))
print(b.count('1'))
